package cn.jiyun.controller;

import cn.jiyun.common.GeocodingService;
import cn.jiyun.common.ReverseGeocodingService;
import cn.jiyun.common.config.Result;
import cn.jiyun.entity.*;
import cn.jiyun.mapper.DwMapper;
import cn.jiyun.entity.Fw;
import cn.jiyun.service.FwService;
import cn.jiyun.service.FwService;
import cn.jiyun.service.ZhylAreaService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.awt.geom.Area;
import java.util.Date;

@RequestMapping("/dwFw")
@RestController
@CrossOrigin
public class DwFwController {
    @Autowired
    private FwService fwService;
    @Autowired
    private ReverseGeocodingService reverseGeocodingService;
    @Autowired
    ZhylAreaService zhylAreaService;
    @RequestMapping("/findPage")
    public Result findPage(Integer pageNum, Integer pageSize, @RequestBody Fw fw){
       Page<Fw> page= fwService.findPage(pageNum,pageSize,fw);
       return Result.ok(page);
    }
    @RequestMapping("findId")
    public Result findId(Integer id){
       Fw fw= fwService.findId(id);
        return Result.ok(fw);
    }

}
